package com.spzx.channel.controller;

import com.spzx.channel.domain.ItemVo;
import com.spzx.channel.service.ItemService;
import com.spzx.common.core.web.controller.BaseController;
import com.spzx.common.core.web.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("item")
@RestController
public class ItemController extends BaseController {
    @Autowired
    ItemService itemService;
    //查询商品详细信息
    @GetMapping("{skuId}")
    public AjaxResult item(@PathVariable Long skuId) throws InterruptedException {
        ItemVo itemVo = itemService.itemChache(skuId);
        return AjaxResult.success(itemVo);
    }
}
